Avoid refering to old GtkContainer API in the docs
authorTimm Bäder <mail@baedert.org>
Sat, 1 Aug 2020 13:34:59 +0000 (15:34 +0200)
committerTimm Bäder <mail@baedert.org>
Sat, 1 Aug 2020 13:34:59 +0000 (15:34 +0200)
gtk/gtkbutton.c
gtk/gtkflowbox.c
gtk/gtklistbox.c
gtk/gtkoverlay.c
gtk/gtkscrolledwindow.c
gtk/gtkviewport.c

index ca2d0607d9c10b0fee08e224c644d124e1efa21d..843c1f49a0ecf5e77733e0a70a593b6d2a3d59b9 100644 (file)
@@ -629,7 +629,7 @@ gtk_button_buildable_iface_init (GtkBuildableIface *iface)
  * gtk_button_new:
  *
  * Creates a new #GtkButton widget. To add a child widget to the button,
- * use gtk_container_add().
+ * use gtk_button_set_child().
  *
  * Returns: The newly created #GtkButton widget.
  */
index 2a4025267573a9ed5cfdea2cf0009c9f08163ad5..93359aa77f4bd887057a0a4c2518d325c106ed3f 100644 (file)
@@ -48,7 +48,7 @@
  * The children of a GtkFlowBox can be dynamically sorted and filtered.
  *
  * Although a GtkFlowBox must have only #GtkFlowBoxChild children,
- * you can add any kind of widget to it via gtk_container_add(), and
+ * you can add any kind of widget to it via gtk_flow_box_insert(), and
  * a GtkFlowBoxChild widget will automatically be inserted between
  * the box and the widget.
  *
@@ -4042,8 +4042,7 @@ gtk_flow_box_insert_css_node (GtkFlowBox    *box,
  * Inserts the @widget into @box at @position.
  *
  * If a sort function is set, the widget will actually be inserted
- * at the calculated position and this function has the same effect
- * as gtk_container_add().
+ * at the calculated position.
  *
  * If @position is -1, or larger than the total number of children
  * in the @box, then the @widget will be appended to the end.
@@ -4239,7 +4238,7 @@ gtk_flow_box_check_model_compat (GtkFlowBox *box)
  * If @model is %NULL, @box is left empty.
  *
  * It is undefined to add or remove widgets directly (for example, with
- * gtk_flow_box_insert() or gtk_container_add()) while @box is bound to a
+ * gtk_flow_box_insert()) while @box is bound to a
  * model.
  *
  * Note that using a model is incompatible with the filtering and sorting
index 443ac6fa2de41e83da649efee8f777d2e76098cd..92833127226c486aacaf3df1312a060c2c784e65 100644 (file)
@@ -55,7 +55,8 @@
  * button in it).
  *
  * Although a #GtkListBox must have only #GtkListBoxRow children you can
- * add any kind of widget to it via gtk_container_add(), and a #GtkListBoxRow
+ * add any kind of widget to it via gtk_list_box_prepend(),
+ * gtk_list_box_append() and gtk_list_box_insert() and a #GtkListBoxRow
  * widget will automatically be inserted between the list and the widget.
  *
  * #GtkListBoxRows can be marked as activatable or selectable. If a row
@@ -2574,8 +2575,7 @@ gtk_list_box_size_allocate (GtkWidget *widget,
  * @child: the #GtkWidget to add
  *
  * Prepend a widget to the list. If a sort function is set, the widget will
- * actually be inserted at the calculated position and this function has the
- * same effect of gtk_container_add().
+ * actually be inserted at the calculated position.
  */
 void
 gtk_list_box_prepend (GtkListBox *box,
@@ -2590,8 +2590,7 @@ gtk_list_box_prepend (GtkListBox *box,
  * @child: the #GtkWidget to add
  *
  * Append a widget to the list. If a sort function is set, the widget will
- * actually be inserted at the calculated position and this function has the
- * same effect of gtk_container_add().
+ * actually be inserted at the calculated position.
  */
 void
 gtk_list_box_append (GtkListBox *box,
@@ -2607,8 +2606,7 @@ gtk_list_box_append (GtkListBox *box,
  * @position: the position to insert @child in
  *
  * Insert the @child into the @box at @position. If a sort function is
- * set, the widget will actually be inserted at the calculated position and
- * this function has the same effect of gtk_container_add().
+ * set, the widget will actually be inserted at the calculated position.
  *
  * If @position is -1, or larger than the total number of items in the
  * @box, then the @child will be appended to the end.
@@ -3578,7 +3576,7 @@ gtk_list_box_check_model_compat (GtkListBox *box)
  * If @model is %NULL, @box is left empty.
  *
  * It is undefined to add or remove widgets directly (for example, with
- * gtk_list_box_insert() or gtk_container_add()) while @box is bound to a
+ * gtk_list_box_insert()) while @box is bound to a
  * model.
  *
  * Note that using a model is incompatible with the filtering and sorting
index c1c641f012b9d1a116f09a88736fd1ce07a30e04..050b8fd7ac7863559128f04ba79ffc2a484d8bcf 100644 (file)
@@ -420,7 +420,7 @@ gtk_overlay_new (void)
  * Adds @widget to @overlay.
  *
  * The widget will be stacked on top of the main widget
- * added with gtk_container_add().
+ * added with gtk_overlay_set_child().
  *
  * The position at which @widget is placed is determined
  * from its #GtkWidget:halign and #GtkWidget:valign properties.
index eaac60a1f24f28fb1dbb747c9858c05493eae1a0..a2f8fcaf4e341930bfcc816e5998bbc769897773 100644 (file)
  * Widgets with native scrolling support, i.e. those whose classes implement the
  * #GtkScrollable interface, are added directly. For other types of widget, the
  * class #GtkViewport acts as an adaptor, giving scrollability to other widgets.
- * GtkScrolledWindow’s implementation of gtk_container_add() intelligently
+ * gtk_scrolled_window_set_child() intelligently
  * accounts for whether or not the added child is a #GtkScrollable. If it isn’t,
  * #GtkScrolledWindow wraps the child in a #GtkViewport and adds that for you.
  * Therefore, you can just add any child widget and not worry about the details.
  *
- * If gtk_container_add() has added a #GtkViewport for you, you can remove
+ * If gtk_scrolled_window_set_child() has added a #GtkViewport for you, you can remove
  * both your added child widget from the #GtkViewport, and the #GtkViewport
  * from the GtkScrolledWindow, like this:
  *
index e9f6a8cda503debe36bbda7d3c91e96dc72021b7..f53a504c5e35fc6c6f91b5b86907f9bfc3551219 100644 (file)
  * capabilities. Use GtkViewport to scroll child widgets such as
  * #GtkGrid, #GtkBox, and so on.
  *
- * If a widget has native scrolling abilities, such as #GtkTextView,
- * #GtkTreeView or #GtkIconView, it can be added to a #GtkScrolledWindow
- * with gtk_container_add(). If a widget does not, you must first add the
- * widget to a #GtkViewport, then add the viewport to the scrolled window.
- * gtk_container_add() does this automatically if a child that does not
- * implement #GtkScrollable is added to a #GtkScrolledWindow, so you can
- * ignore the presence of the viewport.
- *
  * The GtkViewport will start scrolling content only if allocated less
  * than the child widget’s minimum size in a given orientation.
  *